<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="dwz" uri="http://www.lyjuan.cn/dwz/tags" %>

<div class="pageContent">
    <form method="post" action="<dwz:url url="role/relateAction"/>" class="pageForm"
          onsubmit="return validateCallback(this, customNavTabAjaxDone(true));">
        <div class="pageFormContent" layoutH="58">
            <!-- 请求编号 -->
            <input type="hidden" name="roleid" value="${role.id}"/>
            <p class="unit">
                <label>角色：</label>
                <input type="text" disabled value="${role.name}" readonly/>
            </p>
            <p>
                <label>&nbsp;</label>
                <ul class="tree treeFolder treeCheck expand">
                    <c:forEach items="${actions}" var="list">
                        <li><a>${list.group.name}</a>
                            <ul>
                                <c:forEach items="${list.actions}" var="sub">
                                    <li><a tname="actionIds" tvalue="${sub.id}"
                                        <c:forEach items="${hadActions}" var="had">
                                            <c:if test="${had.id == sub.id}">checked="true"</c:if>
                                        </c:forEach>
                                        >${sub.name}<span style="display:inline;margin-left:10px;color:#D8D6D6;">${sub.actionurl}</span></a></li>
                                </c:forEach>
                            </ul>
                        </li>
                    </c:forEach>
                </ul>
            </p>
        </div>

        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">提交</button>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" class="close">取消</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>

</div>